using SqlSugar;
using System.Collections.Generic;

namespace ByteSite.Entitys
{
    /// <summary>
    /// 订单表
    /// </summary>
    public class dt_orders
    {
        /// <summary>
        /// 订单表
        /// </summary>
        public dt_orders()
        {
        }

        /// <summary>
        /// 自增ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public System.Int32 id { get; set; }

        /// <summary>
        /// 站点ID
        /// </summary>
        public System.Int32? site_id { get; set; }

        /// <summary>
        /// 订单号
        /// </summary>
        public System.String order_no { get; set; }

        /// <summary>
        /// 交易号担保支付用到
        /// </summary>
        public System.String trade_no { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public System.Int32? user_id { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public System.String user_name { get; set; }

        /// <summary>
        /// 支付方式
        /// </summary>
        public System.Int32? payment_id { get; set; }

        /// <summary>
        /// 支付手续费
        /// </summary>
        public System.Decimal? payment_fee { get; set; }

        /// <summary>
        /// 支付状态0未支付1待支付2已支付
        /// </summary>
        public System.Int32? payment_status { get; set; }

        /// <summary>
        /// 支付时间
        /// </summary>
        [Newtonsoft.Json.JsonConverter(typeof(Common.TcDateTimeConverter))]
        public System.DateTime? payment_time { get; set; }

        /// <summary>
        /// 快递ID
        /// </summary>
        public System.Int32? express_id { get; set; }

        /// <summary>
        /// 快递单号
        /// </summary>
        public System.String express_no { get; set; }

        /// <summary>
        /// 物流费用
        /// </summary>
        public System.Decimal? express_fee { get; set; }

        /// <summary>
        /// 发货状态1未发货2已发货
        /// </summary>
        public System.Int32? express_status { get; set; }

        /// <summary>
        /// 发货时间
        /// </summary>
        [Newtonsoft.Json.JsonConverter(typeof(Common.TcDateTimeConverter))]
        public System.DateTime? express_time { get; set; }

        /// <summary>
        /// 收货人姓名
        /// </summary>
        public System.String accept_name { get; set; }

        /// <summary>
        /// 邮政编码
        /// </summary>
        public System.String post_code { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public System.String telphone { get; set; }

        /// <summary>
        /// 手机
        /// </summary>
        public System.String mobile { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public System.String email { get; set; }

        /// <summary>
        /// 所属省市区
        /// </summary>
        public System.String area { get; set; }

        /// <summary>
        /// 收货地址
        /// </summary>
        public System.String address { get; set; }

        /// <summary>
        /// 订单留言
        /// </summary>
        public System.String message { get; set; }

        /// <summary>
        /// 订单备注
        /// </summary>
        public System.String remark { get; set; }

        /// <summary>
        /// 是否索要发票
        /// </summary>
        public System.Int32? is_invoice { get; set; }

        /// <summary>
        /// 发票抬头
        /// </summary>
        public System.String invoice_title { get; set; }

        /// <summary>
        /// 税金
        /// </summary>
        public System.Decimal? invoice_taxes { get; set; }

        /// <summary>
        /// 应付商品总金额
        /// </summary>
        public System.Decimal? payable_amount { get; set; }

        /// <summary>
        /// 实付商品总金额
        /// </summary>
        public System.Decimal? real_amount { get; set; }

        /// <summary>
        /// 订单总金额
        /// </summary>
        public System.Decimal? order_amount { get; set; }

        /// <summary>
        /// 积分,正数赠送|负数消费
        /// </summary>
        public System.Int32? point { get; set; }

        /// <summary>
        /// 订单状态1生成订单,2确认订单,3完成订单,4取消订单,5作废订单
        /// </summary>
        public System.Int32? status { get; set; }

        /// <summary>
        /// 下单时间
        /// </summary>
        [Newtonsoft.Json.JsonConverter(typeof(Common.TcDateTimeConverter))]
        public System.DateTime? add_time { get; set; }

        /// <summary>
        /// 确认时间
        /// </summary>
        [Newtonsoft.Json.JsonConverter(typeof(Common.TcDateTimeConverter))]
        public System.DateTime? confirm_time { get; set; }

        /// <summary>
        /// 订单完成时间
        /// </summary>
        [Newtonsoft.Json.JsonConverter(typeof(Common.TcDateTimeConverter))]
        public System.DateTime? complete_time { get; set; }

        /// <summary>
        /// 商品列表
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<Entitys.dt_order_goods> order_goods
        {get;set;}
    }
}